package com.llbnk.springcoding.thread;

import lombok.Data;

import java.util.Collection;
import java.util.List;
import java.util.concurrent.*;

/**
 * @author llbnk
 */
@Data
public class ThreadExcutorConfig  {

    private int core;
    private int max;
    private long keepAliveTime;
    private int capacity;

    private boolean allowCoreThreadTimeOut;
    /**
     * whether to instantly close the thead pool or not
     */
    private boolean waitForTasksToComplete;
    /**
     * whether to await some time to keep thread pool to not get new data or not
     */
    private long awaitTerminationSeconds;
    private String scene;

    public boolean isValid() {
     return max >=core && capacity > 0;
    }
}
